% save_scalp
% Chris Whalen
% University of Illinois
% 06/08/05 - Date Created
% 06/08/05 - Last Modified

%KL 01-04-11: changed dos command lines to run on James

% save_scalp - to save a zipped scalp file in the subjects directory

function save_scalp(file,choice,vol_mask,xyz_mask,thresh)


fid=fopen(file.scalp_zip);
if  fid == -1 
	choice.scalp_save = input('\nSave Scalp? (y/n) ', 's');
	if strcmpi(choice.scalp_save, 'y')==1 
        fprintf('Saving Scalp  %s ...\n',file.scalp);
        save(file.scalp, 'vol_mask', 'xyz_mask');
        zip(file.scalp_zip,file.scalp);
        delete file.scalp
	end
end

